import os
import sys
import json

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app.utils import WebMimicUtil


def get_cookies():
    url = "https://fanyi.baidu.com/mtpe-individual/multimodal?query=hello.&lang=en2zh"
    cookies = WebMimicUtil().get_all_cookies(url)

    # 打印和保存 cookies
    print("所有cookie值为:", json.dumps(cookies, indent=4))


if __name__ == "__main__":
    get_cookies()
